package com.ad_hccm.dao.Week;

import com.ad_hccm.domain.Week.ExperimentalIndication;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * TODO 试验指征表Dao
 */
@Mapper
public interface ExperimentalIndicationDao {
    @Insert("insert into experimental_indication value(#{id}, #{week}, #{IGA}, #{EASI}, #{NRS}, #{IgE})")
    public boolean save(ExperimentalIndication domain);

    @Update("update experimental_indication set IGA = #{IGA}, EASI = #{EASI}, NRS = #{NRS}, IgE = #{IgE} where id=#{id} and week = #{week}")
    public boolean update(ExperimentalIndication domain);

    @Select("select * from experimental_indication where id=#{id}")
    public List<ExperimentalIndication> getById(String id);

    @Select("select * from experimental_indication")
    public List<ExperimentalIndication> getAll();
}